Commit Graph

68 Commits

Author SHA1 Message Date
Ville Skyttä 6934dd92c3 Simplify file_regex.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1494 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:31 +03:00
Ville Skyttä b0b07a56f9 pylint whitespace cleanups.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1475 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:31 +03:00
Ville Skyttä e04d6619d5 Use string methods instead of deprecated string functions.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1471 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:30 +03:00
Ville Skyttä e031f11f29 Drop no longer needed Python < 2.3 workarounds.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1469 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:30 +03:00
Ville Skyttä e1569d9f2b Use tempfile.gettempdir() instead of hardcoding /tmp, Python >= 2.3 is now required.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1468 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:30 +03:00
Michael Scherer 20ba8b636c - lzma compressed file support
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1443 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:30 +03:00
Ville Skyttä a89977b108 rpm.org 4.5+ compatibility fix (Panu Matilainen)
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1439 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:30 +03:00
Michael Scherer 866ba9a39e - add patch for rpm5 found in mandriva package, from peroyvind
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1432 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:30 +03:00
Ville Skyttä f49e6219ba Comment typo fix.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1414 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:29 +03:00
Ville Skyttä b89808f575 Don't lose version flags of prereq dependencies (part of #123, dmueller at suse.de)
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1387 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:28 +03:00
Ville Skyttä 2f5cb35f15 Fix UTF-8 line length calculations, https://bugzilla.redhat.com/399871
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1385 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:28 +03:00
Ville Skyttä 9b4f0b6721 Do not warn about ghost file non-creation for missingok files (#79, dmueller at suse.de)
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1366 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:28 +03:00
Ville Skyttä 3e2f1c5f4d grep() speedup (#80, dmueller at suse.de)
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1364 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:28 +03:00
Ville Skyttä 22fc68e5fd Tolerate nonexistent current dir, https://bugzilla.redhat.com/244835
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1356 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:28 +03:00
Ville Skyttä 592289e8ba Add direct specfile checking, error line numbers (#60, alcapcom at gmail.com).
Also modify error output format for editor parseability (mostly useful for
specfile checks), and include package architectures in output.

NOTE: locally installed filters should be reviewed against the new output
format and ported to it if needed.


git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1349 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:28 +03:00
Ville Skyttä f3295d710c Carry package arch around in pkg object.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1348 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:28 +03:00
Ville Skyttä 9cc2065a2d More fallout from previous change.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1346 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:28 +03:00
Ville Skyttä 522e85ebda Better I/O error and temporary file handling.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1344 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:27 +03:00
Ville Skyttä d97c4e0b7c Implement is_utf8_str without iconv; Python >= 2.2 is now required.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1326 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:27 +03:00
Ville Skyttä 36963589f3 Try to avoid infinite recursion in shell variable expansion
https://bugzilla.redhat.com/210261


git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1288 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:26 +03:00
Ville Skyttä a085538e82 Add start boundary to shell variable assignment regexp
https://bugzilla.redhat.com/210261


git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1287 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:26 +03:00
Ville Skyttä 4af39f65b4 Use sequence based command invocation more; avoids shell escaping/whitespace issues eg. like https://bugzilla.redhat.com/206383
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1275 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:26 +03:00
Ville Skyttä decf2b26a3 Make Pkg.grep more robust, change to instance method, return matching line numbers.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1259 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:25 +03:00
Michael Scherer 1bc33eaa87 r1016@mallarme: misc | 2006-07-06 00:06:39 +0200
- pychecker fix, do not mask builtins


git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1231 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:25 +03:00
Ville Skyttä 6e2915e8e9 Adapt rpm >= 4.2 and source package detection to rpm 4.4.x (x=6?) versions
which no longer have RPMTAG_SOURCEPACKAGE.


git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1200 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:24 +03:00
Ville Skyttä a8bc751960 Cleanups.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1197 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:24 +03:00
Ville Skyttä 807d9d346b Check all matching installed packages, not only the first (for multiarch systems and/or multi-version packages).
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1192 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:24 +03:00
Ville Skyttä c79d60297b Add indentation settings for vi* and *Emacs, use -tt, untabify.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1110 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:22 +03:00
Ville Skyttä d2b36ab0e9 Remove accidentally included debug outputs.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1061 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:42:47 +03:00
Ville Skyttä 5f495b1be4 Add optional UTF-8 checks for docs, specfiles and header field values.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1060 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:42:47 +03:00
Michael Scherer bcd3fd80b7 Fix backtrace when there is a missing tag ( bug #20518 on mdv bugzilla )
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1058 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:42:47 +03:00
Ville Skyttä d4b926a32a Ensure English output for commands whose output is parsed.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1052 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:42:46 +03:00
Ville Skyttä b17ba933d4 Fix indentation, untabify, trim trailing whitespace.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1049 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:42:46 +03:00
Frédéric Lepied ed93b36c59 use stderr for error messages.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1038 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:42:46 +03:00
Frédéric Lepied 2c52486760 handle the new Requires(pre) and co syntax.
fixed broken code that was extracting info from headers multiple times.


git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1023 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:42:46 +03:00
Frédéric Lepied 0534fff5bb use RPMSENSE_SCRIPT_PRE if available to detect prereq.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1008 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:42:30 +03:00
Rafael Garcia-Suarez 770ae3dc48 Fix version checking when the epoch is not defined (Michael Scherer)
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@977 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:42:29 +03:00
Rafael Garcia-Suarez a726521ff3 Make check_versioned_dep ignore epoch when comparing versions (patch
by Michael Scherer)


git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@966 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:42:29 +03:00
Frédéric Lepied baeff7081d in __getitem__ return None instead of [] (change in rpm 4.2.2)
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@820 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:39:08 +03:00
Frédéric Lepied 0d3d3f0409 in shell_var_value escape the var name to avoid a backtrace (Ville Skyttä)
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@763 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:39:07 +03:00
Frédéric Lepied f270219c88 rpm 4.2 support (Ville Skyttä)
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@734 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:38:57 +03:00
Frédéric Lepied af1e870924 Added isNoSource()
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@730 9bc8b190-ac0f-0410-8968-dc7d1f502856
2003-03-25 12:11:32 +00:00
Frédéric Lepied c876e25df4 added support for rpm 4.2
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@728 9bc8b190-ac0f-0410-8968-dc7d1f502856
2003-01-31 22:05:01 +00:00
Frédéric Lepied 8123f5e2f8 make all extracted files accessible.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@676 9bc8b190-ac0f-0410-8968-dc7d1f502856
2002-06-04 04:07:34 +00:00
Frédéric Lepied d242e52059 create a fake filename to satisfy some checks on the filename for InstalledPkg
objects.


git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@642 9bc8b190-ac0f-0410-8968-dc7d1f502856
2002-04-24 20:03:00 +00:00
Frédéric Lepied 6f7ba0e2ed added md5, mtime and rdev to file attributes
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@630 9bc8b190-ac0f-0410-8968-dc7d1f502856
2002-03-04 02:31:21 +00:00
Frédéric Lepied 0f8748324a added check_versioned_dep
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@618 9bc8b190-ac0f-0410-8968-dc7d1f502856
2002-02-07 20:06:50 +00:00
Frédéric Lepied 7153aab8c6 added substitute_shell_vars and shell_var_value functions.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@577 9bc8b190-ac0f-0410-8968-dc7d1f502856
2001-11-25 21:32:34 +00:00
Frédéric Lepied a14cd35b5a corrected warnings reported by pychecker
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@568 9bc8b190-ac0f-0410-8968-dc7d1f502856
2001-11-14 16:34:02 +00:00
Frédéric Lepied 42a01d0096 add the size to the record about a file
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@552 9bc8b190-ac0f-0410-8968-dc7d1f502856
2001-10-27 20:16:26 +00:00