summaryrefslogtreecommitdiff
path: root/scripts/dpkg-architecture.pl
AgeCommit message (Collapse)AuthorFilesLines
2014-10-12dpkg-architecture: Add long command and option names for all short optionsGuillem Jover1-51/+54
2014-10-12dpkg-architecture: Normalize ARGV parsingGuillem Jover1-31/+36
This allows to accept «-ovalue», «-o value», «--option=value» and «--option value», which are the common option formats people expect.
2014-10-12dpkg-architecture: Use || instead of conditional to assign _ARCH variablesGuillem Jover1-14/+4
2014-10-12dpkg-architecture: Initialize DEB_TARGET_ARCH variable w/o DEB_HOST_ARCHGuillem Jover1-1/+1
Because the code did not state that the DEB_TARGET_ARCH requires the DEB_HOST_ARCH variable to be set, it was getting undefined values. Just initialize to the host value w/o assuming it has already been set.
2014-10-06dpkg-architecture: Say arch-wildcard instead of arch-alias in --help outputGuillem Jover1-1/+1
The latter is an old name for the architecture wildcards.
2014-10-06dpkg-architecture: Add architecture restriction options for -LGuillem Jover1-2/+20
This allows to select specific subsets of all valid known architectures, matching by wildcard (-W), endianness (-E) or bits (-B). The restricting options can be combined, or omitted altogether. Closes: #762635
2014-10-06dpkg-architecture: Move -L actual code close to the other commandsGuillem Jover1-9/+6
We can do this now that the variables initialized are performed on demand, so that we can request no variables at all. This makes the code more consistent on when to act on the given commands.
2014-10-06scripts: Place Commands: before Options: in --help outputGuillem Jover1-9/+9
2014-10-06dpkg-architecture: Clarify that -a, -t, -e and -i work with the host systemGuillem Jover1-4/+4
Stating that these handle the “current” architecture makes no sense, and it's not more clear. Just say clearly what they work with.
2014-10-06dpkg-architecture: Add support for target informationGuillem Jover1-2/+55
This adds support for the DEB_TARGET_ family of variables, which denote the machine the compiler should be building for. If the user did not specify them on the command line they will default to the host architecture.
2014-10-06dpkg-architecture: Refactor check_arch_coherency()Guillem Jover1-24/+33
2014-08-15scripts: Use length instead of defined when checking environment variablesGuillem Jover1-1/+1
In these cases we are not interested if the variables are defined, but if they have actual content.
2014-05-17scripts: Switch unused capturing groups to non-capturing onesGuillem Jover1-1/+1
These have better runtime performance, not that it matters in many of the instances here though. Addresses RegularExpressions::ProhibitUnusedCapture. Warned-by: perlcritic
2014-05-17perl: Do not use global match variablesGuillem Jover1-10/+10
Fixes Variables::ProhibitMatchVars. Warned-by: perlcritic
2014-05-17dpkg-architecture: Move -L argument to the Commands --help output sectionGuillem Jover1-1/+1
The -L argument is not an option, it's a full blown command.
2013-12-07Use https:// URLs instead of http:// when possibleGuillem Jover1-1/+1
2013-07-26scripts: Use () instead of qw() for empty importsGuillem Jover1-1/+1
2013-06-22Dpkg: Deprecate lowercase exported by default variablesGuillem Jover1-3/+3
Rename, uppercase and do not export new variables by default, to avoid cluttering the caller namespace, and to give them consistent names. We'll keep the old variables for a while, to not break uses from external modules. Addresses Variables::ProhibitPackageVars.
2013-05-04Do not use double-quotes on strings that do not need interpolationGuillem Jover1-20/+20
Using double-quotes imposes a small performance penalty as the perl parser needs to check if any interpolation is needed. Use double-quotes only when the string contains single-quotes. Ideally we'd use double-quotes too for escaped meta-characters that might otherwise be confusing to immediately see if they need interpolation or not, but the policy does not (currently) allow to ignore these. Fixes ValuesAndExpressions::ProhibitInterpolationOfLiterals. Warned-by: perlcritic
2013-04-30Do not quote simple identifier hash keys in initializationsGuillem Jover1-18/+18
Do not quote the keys for any hash which will always use simple identifiers, as that is taken care of by the => operator. So this does not apply to overload pragmas, version operators, field names, substvars, command line options or filenames. Addresses ValuesAndExpressions::ProhibitInterpolationOfLiterals. Warned-by: perlcritic
2012-06-30Align --version with --help on help outputGuillem Jover1-1/+1
2012-06-30Change all programs to accept -? instead of -h for help outputGuillem Jover1-3/+3
This switch frees the -h option to be used in the distant future for other purposes, it also uses a character that does not have any other obvious meaning for help output, and which is pretty safe to be used blindly by the user in the same way as --help.
2012-06-30Avoid full stop and double newline at the end of errors and warningsJonathan Nieder1-1/+1
Error messages like "couldn't parse control information from foo.deb" are not full sentences, so don't punctuate them like one. The main purpose of this patch is stylistic consistency, but perhaps it can also make copy-and-paste from messages like dpkg-query: no path found matching pattern /usr/bin/agrep. a little easier. Most actual full sentences should remain untouched. A few full sentences are error messages at heart, so this patch converts those to lower-case sentence fragment form, too. [guillem@debian.org: - Add missed strings. - Minor tweaks to strings. ] Closes: #624000 Requested-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Guillem Jover <guillem@debian.org>
2012-06-08scripts: Slice --help output stringsGuillem Jover1-6/+6
Use to opportunity that the strings have been modified in previous commits to slice them, which should make translation a slightly more manageable work in the future. It should also get identical strings coalesced so that there's less to translate.
2012-06-08scripts: Unify “<option>...” --help outputGuillem Jover1-1/+1
2012-05-23scripts: Refer to commands instead of actions in help outputGuillem Jover1-2/+2
2012-02-01Move copyright information from --version output to file comment headersGuillem Jover1-5/+1
Having to keep this information twice is error-prone as it easily gets out of sync. Having to translate it is bothersome. It's not consistent across dpkg tools, some do print it some don't. It's currently not accurate, as the output would need to include the holders for all files that end up being part of the binary. And listing it in the --versions output is visually annoying and the wrong place. Just keep this where it belongs, at the file comment headers, above the license information.
2011-10-02dpkg-architecture: Clarify warning about mismatched GNU system typeGuillem Jover1-1/+2
The way to avoid the warning when cross-building is to set a correct CC environment variable.
2011-10-02dpkg-architecture: Only compute the requested variablesGuillem Jover1-45/+97
This has the following consequences: - Fixes the bootstrapping problem, as the dpkg build system only needs the host architecture, for which dpkg itself is not required. - Reduces the amount of work performed, including loading and parsing unnecessary table files or calling either of gcc or dpkg programs. It has the additional side-effect that some sanity checks are not performed over the host specified variables, but as we are not going to use them, even if they would give warnings, that is ok.
2011-10-02scripts: Use error() or syserr() instead of dieGuillem Jover1-7/+7
This gives unified error messages.
2011-10-02dpkg-architecture: Group build and host variables settingGuillem Jover1-16/+20
This will make it easier to conditionally set them, and makes the code clearer.
2011-03-14Add new variables, DEB_HOST_MULTIARCH and DEB_BUILD_MULTIARCHSteve Langasek1-2/+8
Add new variables that return the "ideal" GNU triplet for each architecture which should be used as the path component for library installation. Signed-off-by: Guillem Jover <guillem@debian.org>
2011-03-01dpkg-architecture: Set DEB_HOST_ARCH and DEB_HOST_GNU_TYPE only onceGuillem Jover1-5/+10
The variables are set initially once, and then possibly overriden by the user supplied arguments. Rearrange the code to set these only once.
2010-03-12Use License instead of Licence in stringsGuillem Jover1-1/+1
This removes almost duplicate strings for translation.
2009-11-08Clean up perl shebang lineGuillem Jover1-1/+1
Use “use warnings” instead of passing “-w”. Remove “--” parameters. Remove shebangs from perl modules. Remove spaces after “#!”.
2009-11-08Replace FSF address by pointing to the gnu.org URLGuillem Jover1-2/+1
Use the <http://www.gnu.org/licenses/> URL, instead of in most cases the outdated FSF address, which is way more stable, as the latter has changed several times in the past.
2009-08-15dpkg-architecture: finish support of DEB_{HOST,BUILD}_ARCH_{BITS,ENDIAN}Raphaël Hertzog1-4/+4
Enhanced cputable to describe the new columns. Let dpkg-dev depend on dpkg (>= 1.15.4) to ensure that we have an updated cputable (and so that a versioned build-dependency on dpkg-dev is enough to use this new feature). Document the new variables in the manual page dpkg-architecture(1).
2009-08-15dpkg-architecture: Add support for bits and endianness variablesGuillem Jover1-0/+6
Add new DEB_(HOST|BUILD)_ARCH_(BITS|ENDIANNESS) variables to ease work for porters.
2009-06-18dpkg-architecture: Remove unused variableGuillem Jover1-1/+0
2008-12-09Dpkg::ErrorHandling: Export public functions by defaultGuillem Jover1-1/+1
The remaining non exported functions and variables need to, either disappear, move to some better place, be renamed, or for variables to get hidden through a getter/setter.
2008-11-11Use new style perl function callsGuillem Jover1-2/+2
2007-11-23Dpkg::Arch: Make get_host_arch and get_build_arch read from the environmentGuillem Jover1-3/+3
All scripts calling get_host_arch are expected to support getting the value overriden by the environment when cross building. Except for dpkg-architecture, which needs more fine grained control, and calls directly the get_raw_ functions.
2007-11-23dpkg-architecture: use a hash instead of independent variablesGuillem Jover1-51/+30
Reduce the code by using a hash to store the build and host architecture values, and the values of @ordered as keys.
2007-11-16dpkg-architecture: Move host and build arch detection code to Dpkg::ArchGuillem Jover1-34/+8
2007-11-16dpkg-architecture: Wrap long strings for die callsGuillem Jover1-2/+6
2007-11-16Dpkg::Arch: Add functions for direct debarch to/from gnutriplet conversionGuillem Jover1-5/+6
2007-11-16dpkg-architecture: Perform -L actions inside argument processing loopGuillem Jover1-39/+39
To preserve the same behaviour move the initialization of host and build variables after the argument processing loop.
2007-10-18Dpkg::ErrorHandling: Add support for format stringsGuillem Jover1-4/+11
2007-10-12Switch perl programs to use the new Dpkg/Arch moduleGuillem Jover1-3/+3
2007-10-11Switch perl programs to use the new Dpkg/ErrorHandling moduleGuillem Jover1-0/+1