Small bug in cdk (and fix)

Kreuzuebersetzer, Diskussion über Änderungen im Tuxbox-CDK und Tuxbox-CVS
Sat-turner
Neugieriger
Neugieriger
Beiträge: 11
Registriert: Freitag 18. März 2005, 13:47

Small bug in cdk (and fix)

Beitrag von Sat-turner »

Updated archive packages are downloaded but not installed automatically due to "old" timestamp. In the text below zlib is taken as an example, but this problem occurs also with the other Archive packages.

Last weekend I updated my cdk since a couple of weeks. I knew that there was an update of the zlib package in it. After the update when I did a "make .enigma" the new version of zlib was downloaded, but nothing further happened. In Makefile there are a number of dependancies that at least should trigger this package to build.

This problem is caused by the timestamp of the downloaded file. The timestamp is of Oct 2004. The file was downloaded with wget which also copies the timestamp. This makes the file .libz (which is the target that should rebuild zlib) newer, and this prohibits the package from building.

Below is a patch for the cdk with my suggestion for a solution. A line is added in rules-archive.pl that does a "touch" on archive package after download. There is also a change included on Makefile.am: This will cause Makefile to rebuild after changing rules-archive.pl.

Could you please consider to include this in cvs? In case of questions or if some needs the patch in a file then you can always contact me.

Cheers,
Sat-Turner

Code: Alles auswählen

Index: cdk/rules-archive.pl
===================================================================
--- cdk/rules-archive.pl        (revision 9)
+++ cdk/rules-archive.pl        (working copy)
@@ -28,6 +28,7 @@
       }
     }
     $output .= " || \\\n\twget -c -P Archive http://tuxbox.berlios.de/pub/tuxbox/cdk/src/" . $file;
+    $output .= "\n\t\@touch \$\@";
     $output .= "\n\n";
   }
 }
Index: cdk/Makefile.am
===================================================================
--- cdk/Makefile.am     (revision 18)
+++ cdk/Makefile.am     (working copy)
@@ -2119,7 +2119,7 @@
 @ARCHIVE@

 if MAINTAINER_MODE
-Makefile-archive: $(top_srcdir)/rules-archive
+Makefile-archive: $(top_srcdir)/rules-archive $(top_srcdir)/rules-archive.pl
        $(top_srcdir)/rules-archive.pl $(top_srcdir)/rules-archive > Makefile-archive
 endif
 
Barf
Developer
Beiträge: 1475
Registriert: Dienstag 4. Februar 2003, 22:02

Beitrag von Barf »

Sat-turner,

your problem is real, your description is correct, as is the fix you are proposing. A drawback with your "touch" is that the information on creation date of the (original) file is destoyed.

However, there are soo many problems with the .deps-stuff: in particular, an updated file, for example updated through CVS update, is not detected. This mechanism was written sometimes long ago, by someone who almost surely has left the project.

I therefore no not want to open that can of worms, at least not for such an, after all, comparatively small problem. Just take as a rule to delete stuff in .deps.

Now, what is the minimal amount of "stuff" in .deps? Now, THAT is a hairy question!
Sat-turner
Neugieriger
Neugieriger
Beiträge: 11
Registriert: Freitag 18. März 2005, 13:47

Beitrag von Sat-turner »

Barf hat geschrieben:A drawback with your "touch" is that the information on creation date of the (original) file is destoyed.
Yes, but why is that important? All files inside the archive still have the original file dates. In the current situation you do not have the information about the download date, I think that is more important.
Barf hat geschrieben:However, there are soo many problems with the .deps-stuff
Is that a good reason not trying to improve it? The change that I proposed will not break anything (I believe) :wink:

Today there was a big change in the dreambox brache: upgrade of compiler, new kernel patch and a new driver. I'm sure that lots of updates will not be made as should be. This small change will help a lot of people.
Barf
Developer
Beiträge: 1475
Registriert: Dienstag 4. Februar 2003, 22:02

Beitrag von Barf »

ok, committed. It is hard to realise exactly what Make does with all these marker-files, so I hope that it will not cause problems.

Thax for the contribution (I should have said that already in my first message).
Sat-turner
Neugieriger
Neugieriger
Beiträge: 11
Registriert: Freitag 18. März 2005, 13:47

Beitrag von Sat-turner »

Thanks Barf :)