oss / rpm2python

A modern, Python-based online viewer for CentOS packages.
0 stars 0 forks source link

Copycat Files Tab #14

Open renishmatta opened 10 years ago

renishmatta commented 10 years ago

It appears that there is a bug where the Files tab is copying the Sources tab for its list of files. What's even more mysterious though is that there appears to be two different entries for the same package in the database:

  1. http://omachi/rpm2python/24923/centos6-rutgers-testing
  2. http://omachi/rpm2python/24922/centos6-rutgers-testing The first entry's tab file is normal while the second one's is not. The first page was grabbed from the home page (omachi/wiki) while the second page was grabbed from a search page for the package. What's going on?
jamchamb commented 8 years ago

Noticing the same thing with a few other packages (e.g. cobbler, phabricator).

Here's how to reproduce it:

  1. Search for a package, pick a version.
  2. Check if the "Files" tab matches "Sources" (except for the links being broken because the first character of each filename is missing...)
  3. Increment the rpm_id in the URL by 1. Check if you see a page for the same package that displays the correct "Files" tab.
gurchik commented 8 years ago

I remember you showing me this bug James. This is likely an issue with repotools. Alex has already noticed a similar issue with the database update/repopulate script when it adds the list of files of an rpm to the database: the names of the files are passed to a bash command with no escaping; in other words, if an rpm contains a file called changelog (current).txt, the script attempts to run ./some_command.sh changelog (current.txt) and fails due to a bash syntax error.

This isn't exactly the same issue mentioned here but I wouldn't be surprised if it's related.

jamchamb commented 8 years ago

Yeah, I suspect the problem is on the database population side. I notice some interesting comments about a disabled MySQL error check in the file_info loop of populatedb.py.