gobolinux / Scripts

The GoboLinux scripts collection
41 stars 9 forks source link

Wrong metadata downloaded by InstallPackage+CheckDependencies #9

Closed lucasvr closed 7 years ago

lucasvr commented 7 years ago

Command invoked: InstallPackage Pidgin

...
GetAvailable: Cannot open /Data/Variable/tmp/Scripts-root/cache/trackedVersionsLists0.bz2 - invalid data stream
GetAvailable: Removing...
CheckDependencies: GTK+ is installed, but version 3.21.4 does not match given dependency.
CheckDependencies: Unable to fulfill the dependency.
CheckDependencies: Meanwhile is not installed.
CheckDependencies: Install official_package for Meanwhile 1.0.2 or skip this dependency? [I]Install/[S]Skip/[IA]Install All/[SA]Skip Alli

CheckDependencies: At file '/Data/Variable/tmp/Scripts-root/dependencies_cache//official_package/Meanwhile--1.0.2-r8--x86_64.tar.bz2': Error at line '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"'Traceback (most recent call last):
  File "/usr/bin/CheckDependencies", line 803, in <module>
    localdirs=localdirs)
  File "/usr/bin/CheckDependencies", line 489, in get_all_dependencies_and_matches_for
    rr, mm = get_all_dependencies_and_matches_for(pp, vv, rr, tt, uu, acceptable_types, mode, recursive, hook=hook, all_matches=all_matches, ask_hook=ask_hook, install_optional=install_optional, noWeb=noWeb, availables=availables)
  File "/usr/bin/CheckDependencies", line 420, in get_all_dependencies_and_matches_for
    all_rules = get_rules_for(p, v, r, t, u, noWeb=noWeb, no_compatlist=no_compatlist, availables=availables)
  File "/usr/bin/CheckDependencies", line 94, in get_rules_for
    toReturn = get_rules_of_files(depfiles, t=t, no_compatlist=no_compatlist)
  File "/usr/bin/CheckDependencies", line 73, in get_rules_of_files
    if rule:
UnboundLocalError: local variable 'rule' referenced before assignment

Contents of /Data/Variable/tmp/Scripts-root/dependencies_cache/official_package/Meanwhile--1.0.2-r8--x86_64.tar.bz2

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta property="og:image" content="https://gobolinux.org/images/gobolinux016.png" />
<meta property="og:title" content="Introducing GoboLinux 016" />
<title>GoboLinux - the alternative Linux distribution
</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet"> 
<style>
body {
   margin: 0px;
   background-color: black;
   font-family: "Open Sans", sans-serif;
}

a {
   color: #48b;
   text-decoration: none;
   font-weight: bold;
}

a:hover {
   color: #80c0f0;
   text-decoration: underline;
   font-weight: bold;
}
...

Analysis

It looks like we're trying to fetch some file from the package store that's not there, and our web server is returning a default HTML file as response rather than a 404.

hishamhm commented 7 years ago

What URL is it trying to download from? The binary packages you are uploading are being stored in http://gobolinux.org/packages/016/ — is the system configured to use that path?

lucasvr commented 7 years ago

The problem is that we're not populating packages/016/dependencies as CheckDependencies expects. The script we use to upload binary packages was supposed to copy the Dependencies file of each package to that directory, but it's not doing that. I'll keep this issue opened until I check-in a fix for it.

hishamhm commented 7 years ago

The best solution long-term is to modify CheckDependencies to stop looking for this files. For now, I added a tweak to the server to serve empty files for these paths. This will silence the errors and produce no change in behavior, it seems.