has the Packages dir for consistency between Fedora and Everything trees

This commit is contained in:
Dennis Gilmore 2012-02-09 09:16:13 -06:00
parent 040cd22fa6
commit 4bc5e8bfb4
2 changed files with 60 additions and 2 deletions

View File

@ -0,0 +1,53 @@
From 45964282afc6a662d325df7955414d01803177dd Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Thu, 9 Feb 2012 09:12:55 -0600
Subject: [PATCH] hash the Packages tree by default, adding a --nohash option
for old style layout
---
src/bin/pungi.py | 4 ++++
src/pypungi/__init__.py | 6 +++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/src/bin/pungi.py b/src/bin/pungi.py
index 6455342..2fe5e7d 100755
--- a/src/bin/pungi.py
+++ b/src/bin/pungi.py
@@ -81,6 +81,8 @@ def main():
config.set('pungi', 'alldeps', "False")
if opts.isfinal:
config.set('pungi', 'isfinal', "True")
+ if opts.nohash:
+ config.set('pungi', 'nohash', "True")
# Actually do work.
mypungi = pypungi.Pungi(config, ksparser)
@@ -190,6 +192,8 @@ if __name__ == '__main__':
help='Force reuse of an existing destination directory (will overwrite files)')
parser.add_option("--isfinal", default=False, action="store_true",
help='Specify this is a GA tree, which causes betanag to be turned off during install')
+ parser.add_option("--nohash", default=False, action="store_true",
+ help='disable hashing the Packages trees')
parser.add_option("-c", "--config", dest="config",
help='Path to kickstart config file')
diff --git a/src/pypungi/__init__.py b/src/pypungi/__init__.py
index 1ef3b8d..5d79fe7 100644
--- a/src/pypungi/__init__.py
+++ b/src/pypungi/__init__.py
@@ -668,7 +668,11 @@ class Pungi(pypungi.PungiBase):
basename = os.path.basename(po.relativepath)
local = po.localPkg()
- target = os.path.join(pkgdir, basename)
+ nohash = self.config.get('pungi', 'nohash')
+ if nohash:
+ target = os.path.join(pkgdir, basename)
+ else:
+ target = os.path.join(pkgdir, po.name[0].lower(), basename)
# Link downloaded package in (or link package from file repo)
try:
--
1.7.7.6

View File

@ -2,7 +2,7 @@
Name: pungi Name: pungi
Version: 2.9 Version: 2.9
Release: 2%{?dist} Release: 3%{?dist}
Summary: Distribution compose tool Summary: Distribution compose tool
Group: Development/Tools Group: Development/Tools
@ -11,7 +11,8 @@ URL: https://fedorahosted.org/pungi
Source0: https://fedorahosted.org/pungi/attachment/wiki/%{version}/%{name}-%{version}.tar.bz2 Source0: https://fedorahosted.org/pungi/attachment/wiki/%{version}/%{name}-%{version}.tar.bz2
Patch1: 0001-Fix-DVD-building-on-ppc64.patch Patch1: 0001-Fix-DVD-building-on-ppc64.patch
Patch2: 0002-Use-a-predictable-ISO-Volume-ID-732298.patch Patch2: 0002-Use-a-predictable-ISO-Volume-ID-732298.patch
PAtch3: hack-ppc-yaboot.patch Patch3: hack-ppc-yaboot.patch
Patch4: 0001-hash-the-Packages-tree-by-default-adding-a-nohash-op.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: anaconda >= 14.3, yum => 3.2.19, repoview, createrepo >= 0.4.11 Requires: anaconda >= 14.3, yum => 3.2.19, repoview, createrepo >= 0.4.11
Requires: lorax Requires: lorax
@ -28,6 +29,7 @@ A tool to create anaconda based installation trees/isos of a set of rpms.
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1
%build %build
@ -62,6 +64,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Thu Feb 09 2012 Dennis Gilmore <dennis@ausil.us> - 2.9-3
- has the Packages dir for consistency between Fedora and Everything trees
* Tue Jan 31 2012 Dennis Gilmore <dennis@ausil.us> - 2.9-2 * Tue Jan 31 2012 Dennis Gilmore <dennis@ausil.us> - 2.9-2
- add patch from will woods for yaboot on ppc - add patch from will woods for yaboot on ppc