Coder Social home page Coder Social logo

cc-packman's People

Contributors

aaronmallen avatar bencor29 avatar blunty666 avatar comp500 avatar elvishjerricco avatar hermanoid avatar jakobdev avatar jcbrockschmidt avatar kepler155c avatar leoverto avatar lyqyd avatar magnificentpako avatar minerobber9000 avatar rustypredator avatar simonnitzsche avatar superaxander avatar thepuzzlemaker avatar tyrumus avatar xblau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cc-packman's Issues

Fails fetching new version of packman

When I have the pre-namespaces version of packman, fetch downloads the new one then fails. This is because it tries to read the new files but it is still using the old version. Packman needs to be restarted after updating the installer.

Add package groups

Groups to install multiple packages at once
example:

name = basic-utils
    type = group
        packages = 
            wget
            cat
    category = utilities
    target = /usr/bin
    version = 0.1
    size = 1103
end

Setup not called on update

Currently packman will not execute the setup script on update... I can see how executing this would be problematic, but perhaps we can include an update property for packages to run on update.

Installed program database.

Create and maintain a local database of which packages the user has installed, and which versions. Perhaps include file location information so that packages may be removed automatically without the need for an uninstall script (while still allowing uninstall scripts).

Error when installing packman from pastebin

I'm getting an error that makes packman completely unusable

installing packman from pastebin results in this error halfway down the repository fetch messages, and then every time i try to run packman after that. It also never installs easy-shell because of this. all my computers that had packman installed before still work, however.
screen shot 2016-08-27 at 1 03 54 pm
screen shot 2016-08-27 at 1 43 15 pm

I suspect this is because of the recent addition of #38 being done incorrectly

Rename /usr/apis to /usr/lib

IMO if were are going to use bin instead of programs (bin being a unix standard, programs being how computercraft rom is laid out) then we should be utilizing lib instead of apis.

Show updateable package in packman search

I'm working on a GUI for packman called Mynaptic. I get the Info of the package with packman search. It is possible, to show,if a package can be updated 8e.g. with a U) in packman search so I can esay ask for it?

Place easy-shell in startup folder in CraftOS 1.8

Since CraftOS 1.8 startup can be a folder. So it would be nice to place easy-shell in this folder and not as file, if packman run on CraftOS 1.8. I have modified the code of esay-shell to do that:

local args = {...}

local exStr = [[shell.run("/usr/bin/easy-shell execute")]]

local function loadStartup(path)
	local lines = {}
	if fs.exists(path) then
		local handle = io.open(path, "r")
		if handle then
			for line in handle:lines() do
				table.insert(lines, line)
			end
			handle:close()
		end
	end
	return lines
end

local function writeStartup(contents,path)
	local handle = io.open(path, "w")
	if handle then
		for i, line in ipairs(contents) do
			handle:write(line.."\n")
		end
		handle:close()
	end
end

if #args >= 1 then
	if args[1] == "execute" then
		shell.setPath(shell.path()..":/usr/bin")

		local loadAPI = os.loadAPI

		os.loadAPI = function(path)
			if fs.exists(path) then
				return loadAPI(path)
			elseif fs.exists(fs.combine("/usr/apis", path)) then
				return loadAPI(fs.combine("/usr/apis", path))
			end
		end
	elseif args[1] == "install" then
        local path
        if tonumber(os.version():sub(9)) > 1.7 then
            path = "/startup/easyshell.lua"
        else
            path = "/startup"
        end
		local contents = loadStartup(path)
		local changed = false
		if fs.exists(path) then			
			local exists = false
			
			for i = 1, #contents do
				if contents[i] == exStr then
					exists = true
					break
				end
			end
			
			if not exists then
				table.insert(contents, 1, exStr)
				changed = true
			end
		else
			contents[1] = exStr
			changed = true
		end
		if changed then
			writeStartup(contents,path)
		end
		shell.run("usr/bin/easy-shell execute")
	elseif args[1] == "remove" then
		local contents = loadStartup()
		for i = #contents, 1, -1 do
			 if contents[i] == exStr then
				table.remove(contents, i)
			end
		end
		writeStartup(contents)
	end
end

If it runs on CraftOS 1.7 and earlier, it write the file /startup. On CraftOS 1.8 it write the file /startup/easyshell.lua, so the User can put other Programs in the startup folder.

Error with new packman

Could not resolve dependency on main/setup in package demosthenex-turbine
packman:83: invalid key to 'next'

It appears when I try to install, update or remove anything. Fetching works fine.

Virtual package support?

Could you add support for some kind of virtual packages, I mean packages without any files, so they just load their dependencies, for example you have a program suite, you add all programs as own packages and then create a virtual package loading them all?

New CC versions with package table interferes with the package API

Since the package table has been implemented in later versions of CC, packman assumes that its own package library was loaded because the package global exists (see loadPackageAPI function in packman script).

A simple solution would just be to rename it however I'm not sure if programs from other projects rely on the package API from packman.

Port for open computers

Direwolf20 just released his new pack... it looks like there's no CC but he does have open computers... It looks like it shares a lot of the same functionality as CC but there are some small differences (i.e. internet.request() vs http.get())

The scope of this feature request is to create either a seperate port of packman for Open Computers or refactor packman in a way that it can handle both.

All my repositories error

This is probably (almost certainly) on my behalf. When I try to install glucose, I get an error.

This does not happen to any other repositories, yet I don't see what I am doing wrong. Am I missing the "size" field?

Add support for help files

One feature that I think would be nice would be built-in support for help files. Maybe add a folder /usr/help which is added with help.setPath, and then packages can specify links to help files that will be downloaded there.

Then, users can simply use the help command to get help on packages installed with packman.

Add your own repo

Besides the official repos I think alot of people would like to use the really nice utility to manage their own scripts so they can be easily installed on other computers.

packman repo add <url>
The url can point to an actual repository, a list of repos or a pastebin code with repos

packman repo remove <name / url>
Does the opposite, removes a repo from the local list of repos

Add search.

Add ability to search through repos by name/category.

Restructure update transaction sequence

Restructure update sequence to perform file removal at the end of the rest of the transactions. Only queue file removal transactions for files which were removed from multi-file packages (file present in installed list, but no contents in new package state).

Cannot use capital letters in dependency name.

How to replicate:

  1. Get my repo file here
  2. rename libcfg to libCFG (mind the capitalization) (don't forget aconf which has a dependency on libCFG)
  3. packman install
  4. Observe error packman:265: invalid key to 'next'

Run Programs out of the target as setup or cleanup

I want to give my programs a manpage. And theres no thing in packman to do that (you have not accepted my pull request) so I have the idea to run wget as setup and delete as cleanup.But I can only run Programs, who are in the target of the package. Is there any way to run Programs outside of the target .I know. that I can make a second package or write a script, but thats my favourite possibility.

Track versions

Change repolist to have a version field, use versions to determine which packages to update when updating.

Namespacing Packman Packages

With my current understanding of the way packman addFile works if two packages have a file of the same name (i.e. install) the latest package installed will override the other. Perhaps namespacing packages would address this issue. Ideally all of my packages would be installed in /usr/bin/aaronmallen/<package file> but easy-shell would still be able to expose the individual programs to the root. Not sure if this issue should be here or on the easy-shell repo...

What about a "community" repo?

I think it could be used to host the commonly used APIs that don't have a package for the programs that depend on them, or for the people that don't want to have a repo for them and just want to put a package or two.

What do you guys think about it?

Add Helpfolder to help.path()

It would be nice, if the help folder from the latset update is in help.path(), so the Users can use the help programm to read the helpfile.

Version String Support

Remove old tonumber() version comparison and replace it with an iterative tonumber() comparison to check each period-separated component of the version string. Non-numeric characters in version strings will continue to be unsupported.

Add support for ignore files

I can see a scenario where developers may want files in their repository that do not need to be downloaded to the CC computer. As an example I like to minimize my lua files using npm and luamin, I'll typically develop in the src directory but really only need the dist directory downloaded to the cc machine. This could be implemented in a couple of ways

  1. Like ruby gems you could specify files that should be included via a regex string
    or
  2. You could specify which files should be ignored like a .gitignore maybe this could be implemented with a .packignore file.

I sort of like the second proposal there, but I'll leave that decision to you.

Add optional restrictions

Would it be possible to add restrictions for packages to packman? For example, add a field named "restrict" where a developer can specify an api or basic statement that must evaluate to true to allow the package to be installed. For example, having "restrict = turtle" would mean the package could only be installed to turtles.

Add a "list of urls" download type.

I am currently using a very hacky program i made to do this, but it would be pretty useful if it was integrated to packman itself, as currently downloading multiple files are only limited to repositories

Packman will get a file which has the following format:

https://example.com/file1 /file1
https://example.com/file2 /file2
https://example.com/file3 /file3

And it'll save the files (possibly relative to the target folder) in the place after the seperating space.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.