-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add detection of %posttrans and %pretrans scriptlet from rpm header
In specs files, user may use %posttrans and %pretrans scriptlet like this: Requires(pretrans): test_pkg Requires(posttrans): test_pkg This commit add detection to the above special scriptlet Signed-off-by: Shuo Wang <[email protected]>
- Loading branch information
Showing
8 changed files
with
44 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,29 +196,29 @@ def test_xmlfile_add_pkg(self): | |
<name>Archer</name> | ||
<arch>x86_64</arch> | ||
<version epoch="2" ver="3.4.5" rel="6"/> | ||
<checksum type="sha256" pkgid="YES">4e0b775220c67f0f2c1fd2177e626b9c863a098130224ff09778ede25cea9a9e</checksum> | ||
<checksum type="sha256" pkgid="YES">65dd4d39b7539cb0b6b150db20a314402845e006cc0456d910bce87741f81b82</checksum> | ||
<summary>Complex package.</summary> | ||
<description>Archer package</description> | ||
<packager>Sterling Archer</packager> | ||
<url>http://soo_complex_package.eu/</url> | ||
<time file="111" build="1365416480"/> | ||
<size package="3101" installed="0" archive="544"/> | ||
<time file="111" build="1710742930"/> | ||
<size package="7737" installed="0" archive="544"/> | ||
<location href=""/> | ||
<format> | ||
<rpm:license>GPL</rpm:license> | ||
<rpm:vendor>ISIS</rpm:vendor> | ||
<rpm:group>Development/Tools</rpm:group> | ||
<rpm:buildhost>localhost.localdomain</rpm:buildhost> | ||
<rpm:sourcerpm>Archer-3.4.5-6.src.rpm</rpm:sourcerpm> | ||
<rpm:header-range start="280" end="2865"/> | ||
<rpm:header-range start="4504" end="7517"/> | ||
<rpm:provides> | ||
<rpm:entry name="Archer" flags="EQ" epoch="2" ver="3.4.5" rel="6"/> | ||
<rpm:entry name="Archer(x86-64)" flags="EQ" epoch="2" ver="3.4.5" rel="6"/> | ||
<rpm:entry name="bara" flags="LE" epoch="0" ver="22"/> | ||
<rpm:entry name="barb" flags="GE" epoch="0" ver="11.22.33" rel="44"/> | ||
<rpm:entry name="barc" flags="EQ" epoch="0" ver="33"/> | ||
<rpm:entry name="bard" flags="LT" epoch="0" ver="44"/> | ||
<rpm:entry name="bare" flags="GT" epoch="0" ver="55"/> | ||
<rpm:entry name="Archer" flags="EQ" epoch="2" ver="3.4.5" rel="6"/> | ||
<rpm:entry name="Archer(x86-64)" flags="EQ" epoch="2" ver="3.4.5" rel="6"/> | ||
</rpm:provides> | ||
<rpm:requires> | ||
<rpm:entry name="fooa" flags="LE" epoch="0" ver="2"/> | ||
|
@@ -227,6 +227,8 @@ def test_xmlfile_add_pkg(self): | |
<rpm:entry name="food" flags="LT" epoch="0" ver="4"/> | ||
<rpm:entry name="fooe" flags="GT" epoch="0" ver="5"/> | ||
<rpm:entry name="foof" flags="EQ" epoch="0" ver="6" pre="1"/> | ||
<rpm:entry name="foog" flags="EQ" epoch="0" ver="7" pre="1"/> | ||
<rpm:entry name="fooh" flags="EQ" epoch="0" ver="8" pre="1"/> | ||
</rpm:requires> | ||
<rpm:conflicts> | ||
<rpm:entry name="bba" flags="LE" epoch="0" ver="2222"/> | ||
|
@@ -264,7 +266,7 @@ def test_xmlfile_add_pkg(self): | |
self.assertEqual(filelists.read(), | ||
"""<?xml version="1.0" encoding="UTF-8"?> | ||
<filelists xmlns="http://linux.duke.edu/metadata/filelists" packages="0"> | ||
<package pkgid="4e0b775220c67f0f2c1fd2177e626b9c863a098130224ff09778ede25cea9a9e" name="Archer" arch="x86_64"> | ||
<package pkgid="65dd4d39b7539cb0b6b150db20a314402845e006cc0456d910bce87741f81b82" name="Archer" arch="x86_64"> | ||
<version epoch="2" ver="3.4.5" rel="6"/> | ||
<file>/usr/bin/complex_a</file> | ||
<file type="dir">/usr/share/doc/Archer-3.4.5</file> | ||
|
@@ -289,7 +291,7 @@ def test_xmlfile_add_pkg(self): | |
self.assertEqual(other.read(), | ||
"""<?xml version="1.0" encoding="UTF-8"?> | ||
<otherdata xmlns="http://linux.duke.edu/metadata/other" packages="0"> | ||
<package pkgid="4e0b775220c67f0f2c1fd2177e626b9c863a098130224ff09778ede25cea9a9e" name="Archer" arch="x86_64"> | ||
<package pkgid="65dd4d39b7539cb0b6b150db20a314402845e006cc0456d910bce87741f81b82" name="Archer" arch="x86_64"> | ||
<version epoch="2" ver="3.4.5" rel="6"/> | ||
<changelog author="Tomas Mlcoch <[email protected]> - 1.1.1-1" date="1334664000">- First changelog.</changelog> | ||
<changelog author="Tomas Mlcoch <[email protected]> - 2.2.2-2" date="1334750400">- That was totally ninja!</changelog> | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters