Re: Fix error message from tools/sort_deps

2009-08-23 Thread Ian Campbell
The new apt seems to print lots of 
W: Unable to read 
/storage/mirror/tmp/apt/squeeze-powerpc/apt/preferences.d/ - FileExists (2: No 
such file or directory)
when called by sort_deps. I guess the directory needs to be mkdir'd
somewhere. There does not really seem to be a good place to do this but
the patch below seems like as good a place as any.

Ian. 

diff --git a/Makefile b/Makefile
index e8f92a7..8bb72b2 100755
--- a/Makefile
+++ b/Makefile
@@ -191,6 +191,8 @@ $(ADIR)/status:
@echo Generating a fake status file for apt-get and apt-cache...
$(Q)for ARCH in $(ARCHES); do \
mkdir -p $(ADIR)/$(CODENAME)-$$ARCH; \
+   mkdir -p $(ADIR)/$(CODENAME)-$$ARCH/apt; \
+   mkdir -p $(ADIR)/$(CODENAME)-$$ARCH/apt/preferences.d; \
if [ $$ARCH = source -o $(INSTALLER_CD) = 1 -o 
$(INSTALLER_CD) = 2 ];then \
: $(ADIR)/$(CODENAME)-$$ARCH/status ; \
else \
diff --git a/debian/changelog b/debian/changelog
index 33f05ff..13047ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,7 @@ debian-cd (3.1.3) UNRELEASED; urgency=low
 packages or D-I components relative to a regular image.
   * Add variant to create i386/amd64 images that support installing Xen guests.
   * Recognise and ignore Enhances: lines.
+  * Create apt/preferences.d in APTTMP, keeps newer apt from printing a 
warning. 
 
   [ Raphaƫl Hertzog ]
   * Fallback looking for syslinux/silo/yaboot in $CODENAME when $DI_CODENAME



signature.asc
Description: This is a digitally signed message part


Re: Fix error message from tools/sort_deps

2009-08-23 Thread Steve McIntyre
On Sun, Aug 23, 2009 at 10:24:27AM +0100, Ian Campbell wrote:
The new apt seems to print lots of 
W: Unable to read 
 /storage/mirror/tmp/apt/squeeze-powerpc/apt/preferences.d/ - FileExists (2: 
 No such file or directory)
when called by sort_deps. I guess the directory needs to be mkdir'd
somewhere. There does not really seem to be a good place to do this but
the patch below seems like as good a place as any.

Ian. 

diff --git a/Makefile b/Makefile
index e8f92a7..8bb72b2 100755
--- a/Makefile
+++ b/Makefile
@@ -191,6 +191,8 @@ $(ADIR)/status:
   @echo Generating a fake status file for apt-get and apt-cache...
   $(Q)for ARCH in $(ARCHES); do \
   mkdir -p $(ADIR)/$(CODENAME)-$$ARCH; \
+  mkdir -p $(ADIR)/$(CODENAME)-$$ARCH/apt; \
+  mkdir -p $(ADIR)/$(CODENAME)-$$ARCH/apt/preferences.d; \

As we're using -p, we only need to call mkdir for the deepest
directory. I've modified to do that and applied. Thanks!

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
...In the UNIX world, people tend to interpret `non-technical user'
 as meaning someone who's only ever written one device driver. -- Daniel Pead


-- 
To UNSUBSCRIBE, email to debian-cd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Fix error message from tools/sort_deps

2009-08-09 Thread Frans Pop
On Friday 07 August 2009, Ian Campbell wrote:
 It seems that apt-cache depends recently (as of 0.7.22) started
 including Enhances lines in its output. Leading to:

  Generating dependency tree with apt-cache depends...
 UNEXPECTED: Line `  Enhances: kvm
 ' while parsing end of deptree from 'kvm-source'
 [etc]

 Ignore these lines.

Committed.

Cheers,
FJP


-- 
To UNSUBSCRIBE, email to debian-cd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Fix error message from tools/sort_deps

2009-08-07 Thread Ian Campbell
So it's not quite as simple as I thought, this patch just leads to other
error messages later on.

On Fri, 2009-08-07 at 18:09 +0100, Ian Campbell wrote:
 It seems that apt-cache depends recently (as of 0.7.22) started
 including Enhances lines in its output. Leading to:
  Generating dependency tree with apt-cache depends...
 UNEXPECTED: Line `  Enhances: kvm
 ' while parsing end of deptree from 'kvm-source'
 [etc]
 
 Accept these lines gracefully.
 
 --- a/tools/sort_deps
 +++ b/tools/sort_deps
 @@ -308,7 +308,7 @@ sub read_depends {
   my $i = shift; # Ref
   my $lines = shift; # Ref
   my $pkg = shift;   # string
 - my $types = 
 (?:Pre)?Depends|Suggests|Recommends|Replaces|Conflicts|Breaks;
 + my $types = 
 (?:Pre)?Depends|Suggests|Recommends|Replaces|Conflicts|Breaks|Enhances;
   my (@dep, @rec, @sug);
   my ($type, $or, $elt);
  
 
 
-- 
Ian Campbell

Your society will be sought by people of taste and refinement.


signature.asc
Description: This is a digitally signed message part


Re: Fix error message from tools/sort_deps

2009-08-07 Thread Ian Campbell
I see now, I think it should be:

--- 
It seems that apt-cache depends recently (as of 0.7.22) started
including Enhances lines in its output. Leading to:

 Generating dependency tree with apt-cache depends...
UNEXPECTED: Line `  Enhances: kvm
' while parsing end of deptree from 'kvm-source'
[etc]

Ignore these lines.
---
 tools/sort_deps |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/sort_deps b/tools/sort_deps
index e40073c..1946c43 100755
--- a/tools/sort_deps
+++ b/tools/sort_deps
@@ -308,7 +309,7 @@ sub read_depends {
my $i = shift; # Ref
my $lines = shift; # Ref
my $pkg = shift;   # string
-   my $types = 
(?:Pre)?Depends|Suggests|Recommends|Replaces|Conflicts|Breaks;
+   my $types = 
(?:Pre)?Depends|Suggests|Recommends|Replaces|Conflicts|Breaks|Enhances;
my (@dep, @rec, @sug);
my ($type, $or, $elt);
 
@@ -317,7 +318,8 @@ sub read_depends {
# Get rid of replaces and conflicts ...
if (($type eq Replaces) or
($type eq Conflicts) or
-   ($type eq Breaks)) {
+   ($type eq Breaks) or
+   ($type eq Enhances)) {
$$i++;
while ($lines-[$$i] =~ m/^\s{4}/) {
$$i++;
-- 
1.6.3.3


-- 
Ian Campbell

It's hard to be humble when you're perfect.


signature.asc
Description: This is a digitally signed message part


Re: Fix error message from tools/sort_deps

2009-08-07 Thread Frans Pop
On Friday 07 August 2009, Ian Campbell wrote:
 So it's not quite as simple as I thought, this patch just leads to
 other error messages later on.

Suggest you compare commit r1911 which did the same for Breaks.

Cheers,
FJP


-- 
To UNSUBSCRIBE, email to debian-cd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Fix error message from tools/sort_deps

2009-08-07 Thread Ian Campbell
On Fri, 2009-08-07 at 19:41 +0200, Frans Pop wrote:
 On Friday 07 August 2009, Ian Campbell wrote:
  So it's not quite as simple as I thought, this patch just leads to
  other error messages later on.
 
 Suggest you compare commit r1911 which did the same for Breaks.

Thanks, that's basically what I ended up with in my follow up patch.

Ian.

-- 
Ian Campbell

QOTD:
Don't let your mind wander -- it's too little to be let out alone.


signature.asc
Description: This is a digitally signed message part